import useAxios from "@/hooks/useAxios"

function add(data){
  return useAxios('/shop-api/cart/add',{
    method:"POST",
    data,
    reqAuth:true,
    loading:true
  })
}
function list(){
  return useAxios('/shop-api/cart/list',{
    method:"POST",
    reqAuth:true
  })
}
function getByIDs(ids) {
  return useAxios('/shop-api/cart/getByIDs',{
    method:"POST",
    data:ids,
    reqAuth:true
  })
}
function edit(data){
  return useAxios('/shop-api/cart/edit',{
    method:"POST",
    data,
    reqAuth:true
  })
}
function del(ids){
  return useAxios('/shop-api/cart/delete',{
    method:"POST",
    data:{
      ids
    },
    reqAuth:true
  })
}
export {add,list,getByIDs,edit,del}